Skip to content

fix(ci): explain the missing yank scope instead of a bare 403 - #9

Merged
spacedevin merged 1 commit into
mainfrom
fix/yank-scope-message
Aug 3, 2026
Merged

fix(ci): explain the missing yank scope instead of a bare 403#9
spacedevin merged 1 commit into
mainfrom
fix/yank-scope-message

Conversation

@spacedevin

Copy link
Copy Markdown
Owner

The yank run failed:

error: failed to yank from the registry at https://crates.io
Caused by:
  the remote server responded with an error (status 403 Forbidden):
  this token does not have the required permissions to perform this action

crates.io scopes yanking separately from publishing. The CARGO_REGISTRY_TOKEN secret has publish-new + publish-update — which is exactly what's needed to release the crate, and not enough to yank it. The raw error never says which scope is missing, so the next person hits the same wall.

The step now detects that specific failure and prints the scope, the page to fix it on, and a note to keep the publish scopes if it's the same token.

To actually run the yanks: add the yank scope at https://crates.io/settings/tokens (keeping publish-new + publish-update), update the CARGO_REGISTRY_TOKEN secret, then:

gh workflow run crates-yank.yml -f version=1.2.1
gh workflow run crates-yank.yml -f version=1.2.3

The yank run failed with

  403 Forbidden: this token does not have the required permissions

because crates.io scopes yanking separately from publishing — a token with
publish-new + publish-update, which is what releases this crate, cannot yank it.
The raw error never says which scope is missing, so the next person hits the
same wall.

Now it names the scope, the page to fix it on, and the fact that the release
scopes need keeping if it is the same token.
@spacedevin
spacedevin merged commit abc0c02 into main Aug 3, 2026
5 checks passed
@spacedevin
spacedevin deleted the fix/yank-scope-message branch August 3, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant